ALMaSS  1.0
The Animal, Landscape and Man Simulation System
vole_all.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************************************
3 Copyright (c) 2011, Christopher John Topping, University of Aarhus
4 All rights reserved.
5 
6 Redistribution and use in source and binary forms, with or without modification, are permitted provided
7 that the following conditions are met:
8 
9 Redistributions of source code must retain the above copyright notice, this list of conditions and the
10 following disclaimer.
11 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
12 the following disclaimer in the documentation and/or other materials provided with the distribution.
13 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
15 IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
16 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
17 BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
18 BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
19 BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
21 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
22 ********************************************************************************************************
23 */
39 //---------------------------------------------------------------------------
40 #ifndef Vole_allH
41 #define Vole_allH
42 
43 #include "GeneticMaterial.h"
44 
45 class MovementMap16;
46 
47 
48 //---------------------------------------------------------------------------
49 //---------------------------------------------------------------------------
50 
55 typedef enum
56 {
58  //Males
64  //Females
75 
76 
77 
78 typedef enum {
84 //------------------------------------------------------------------------------
85 
86 // Forward Declarations
87 
89 class Landscape;
90 class AlleleFreq1616;
93 class AlleleFreq;
94 class GeneticMaterial;
95 
96 //------------------------------------------------------------------------------
97 
98 typedef enum
99 {
104  vob_foobar
106 
107 
113 {
114 public:
115  bool m_inAtrap;
116 };
117 
123 {
124  public:
125  int x;
126  int y;
127  int age;
128  double weight;
129  int xborn;
130  int yborn;
132  int ElemBorn;
133  int VegBorn;
135  int FatherId;
136  int MotherId;
140  //GeneticMaterial256_16 Genes256_16;
142  bool m_flag;
143  bool m_gflag;
144  bool m_dflag;
145  double misc_use; // used to pass a parameter e.g. for pesticide use
146 };
147 //------------------------------------------------------------------------------
152 class Vole_Base : public TAnimal
153 {
154 // Attributes
155 protected:
164  unsigned int m_MinTerrRange;
166  unsigned m_MotherId;
168  unsigned m_FatherId;
170  int m_Death;
174  bool m_Sex;
176  bool m_Mature;
178  int m_Age;
180  int m_XBorn; //*TD*
182  int m_YBorn; //*TD*
186  int m_ElemBorn; //*TD*
188  int m_VegBorn; //*TD*
192  double m_Weight;
194  bool m_fertile;
195 #ifdef __VoleStarvationDays
197  int m_StarvationDays;
198 #endif
199  // No of young produced;
208  unsigned IDNo;
210  int SimH, SimW;
212  //GeneticMaterial256_16 MyGenes;
216  static unsigned int m_MaxMaleTerritorySize;
218  static unsigned int m_MaxFemaleTerritorySize;
220  static unsigned int m_MinMaleTerritorySize;
222  static unsigned int m_MinFemaleTerritorySize;
224  static double m_MinFVoleHabQual;
226  static double m_MinJMVoleHabQual;
228  static double m_MinMVoleHabQual;
233  // The values below were fitted by trial and error but await a detailed sensitivity analysis when spatial data is available
235  static double m_FHabQualThreshold3;
237  static double m_FHabQualThreshold2;
239  static double m_FHabQualThreshold1;
241  static double m_MHabQualThreshold3;
243  static double m_MHabQualThreshold2;
245  static double m_MHabQualThreshold1;
247  static bool m_BreedingSeason;
248 #ifdef __VoleStarvationDays
251  static int m_MaxStarvationDays;
252 #endif
253 
254 #ifdef __VOLEPESTICIDEON
255 public:
256  double SupplyPesticideLoad() { return m_pesticideload; }
257  double SupplyBioDegradeRate() { return m_pesticideBioDegradeRate; }
258  void SetPesticideInfluenced1(bool a_bool) { m_pesticideInfluenced1 = a_bool; }
259  void SetPesticideInfluenced2(bool a_bool) { m_pesticideInfluenced2 = a_bool; }
260  bool GetPesticideInfluenced1() { return m_pesticideInfluenced1; }
261  bool GetPesticideInfluenced2() { return m_pesticideInfluenced2; }
262 protected:
263  bool m_pesticideInfluenced1;
264  bool m_pesticideInfluenced2;
265  double m_pesticideInfluenced3;
266  double m_pesticideload;
267  double m_pesticideBioDegradeRate;
268  void AddToPesticidLoad(double a_pestamount) { m_pesticideload+=a_pestamount; }
269  void BioDegradePesticide() { m_pesticideload *= m_pesticideBioDegradeRate; }
270  void ClearPesticidLoad() { m_pesticideload = 0.0; }
271  void SetBioDegradeRate(double a_rate) { m_pesticideBioDegradeRate = a_rate; }
272  virtual void PesticideIngestion( void );
273  virtual void ActOnPesticideDose( void );
274  virtual void ModelinkPesticide() { ; }
275  virtual void ModelinkPesticide21TWA(double /* a_dose */ ) { ; }
276  virtual void Vinclozolin(double /* a_dose */ ) { ; }
277  virtual void GeneralOrganophosphate(double /* a_dose */) { ; }
278  virtual void GeneralEndocrineDisruptor(double /* a_dose */) { ; }
279  virtual void GeneticDemoPesticide(double /* a_dose */){ ; }
280 #endif
281 #ifdef __VOLERODENTICIDEON
282  virtual void RodenticideIngestion(void);
283 #endif
284 public:
285 // Functions
286  Vole_Base(struct_Vole_Adult * p_aVoleStruct);
287  virtual ~Vole_Base();
288  virtual void Init(struct_Vole_Adult * p_aVoleStruct);
289  virtual void ReInit(struct_Vole_Adult * p_aVoleStruct);
290  virtual void BeginStep() {};
291  virtual void Step() {};
292  virtual void EndStep();
293  void st_Dying();
294 
296  void SetBreedingSeason( bool a_flag ) { m_BreedingSeason = a_flag; }
298  void SetWeight(double W) {m_Weight=W;}
300  void Setm_Mature() { m_Mature = true; }
302  void Set_BirthYear(int BirthYear) {m_BirthYear = BirthYear;}
303 
305  void Set_MotherId(unsigned MotherIdNo) {m_MotherId = MotherIdNo;}; // ***TD***
307  void Set_FatherId(unsigned FatherIdNo) {m_FatherId = FatherIdNo;}; // ***TD***
309  void Set_NoYoungTot (int a_NoOfYoung) {m_NoOfYoungTotal+=a_NoOfYoung;}; // ***TD***
311  void Set_XBorn (int a_Location_x) {m_XBorn = a_Location_x;}; // ***TD***
313  void Set_YBorn (int a_Location_y) {m_YBorn = a_Location_y;}; // ***TD***
315  void Set_ElemBorn (int a_Location_x, int a_Location_y) // ***TD***
316  {
317  TTypesOfLandscapeElement m_EBorn = m_OurLandscape->SupplyElementType(a_Location_x, a_Location_y);
319  }
321  void Set_VegBorn (int a_Location_x, int a_Location_y) // ***TD***
322  {
323  TTypesOfVegetation m_VBorn = (m_OurLandscape->SupplyVegType(a_Location_x, a_Location_y));
325  }
327  void Set_PolyRefBorn (int a_Location_x, int a_Location_y) {m_PolyRefBorn = (m_OurLandscape->SupplyPolyRef(a_Location_x, a_Location_y));}; // ***TD***
329  void Set_Age(int Age) {m_Age=Age;}
330 
332  virtual int WhatState() {return CurrentVState;}
336  bool SupplyTerritorial() {return m_Have_Territory;} // ***TD***
338  int SupplyFatherId() {return m_FatherId;}; // ***TD***
340  int SupplyMotherId() {return m_MotherId;}; // ***TD***
342  bool SupplySex() {return m_Sex;};
344  int SupplyBirthYear() {return m_BirthYear;}; // ***TD***
346  int SupplyTotNoYoung() {return m_NoOfYoungTotal;}; // ***TD***
348  int SupplyXBorn() {return m_XBorn;}; // ***TD***
350  int SupplyYBorn() {return m_YBorn;}; // ***TD***
352  int SupplyPolyRefBorn() {return m_PolyRefBorn;}; // ***TD***
354  int SupplyElemBorn() {return m_ElemBorn;}; // ***TD***
358  int SupplyVegBorn() {return m_VegBorn;}; // ***TD***
360  int SupplyTerrRange() {return m_TerrRange;}; // ***TD***
362  double SupplyWeight() {return m_Weight;};
364  int SupplyIDNo() {return IDNo;}; // ***TD***
366  bool SupplyMature() {return m_Mature;};
368  int SupplyDeathCause() {return m_Death;}; // ***TD***
370  unsigned SupplyAge() {return m_Age;};
372  unsigned SupplyX() {return m_Location_x;};
374  unsigned SupplyY() {return m_Location_y;};
376  bool SupplyInTrap() { return m_intrappos.m_inAtrap; }
380  void SetFree() { m_intrappos.m_inAtrap = false; }
386  int SupplyAllele(int locus, int allele) { return m_MyGenes.GetAllele(locus,allele); }
387  uint32 SupplyMyAllele(int i, int j)
388  {return m_MyGenes.GetAllele(i, j);} //*TD
403 
404  virtual void OnKilled() {};
405  virtual bool MortalityTest();
409  void CopyMyself( VoleObject a_vole );
414  void SetFertile(bool f) {
418  m_fertile=f;
419  }
424  bool GetFertile() {
428  return m_fertile;
429  }
430 protected:
431  double CalculateCarryingCapacity( int x, int y, int a_ddep );
432  //double CalculateCarryingCapacity(int x,int y,int &p_stand_x,int &p_stand_y);
433  int MoveQuality(int p_x, int p_y);
434  void MoveTo(int p_Vector,int p_Distance, int iterations);
435  void DoWalking(int p_Distance,int &p_Vector, int &vx, int &vy);
436  void DoWalkingCorrect(int p_Distance,int &p_Vector, int &vx, int &vy);
437  void Escape(int p_Vector,int p_Distance);
438  void CheckTraps();
439  virtual void SetLocation() {};
440  virtual void FreeLocation() {};
441  virtual bool GetLocation(int , int ) {return false;};
442 };
443 //------------------------------------------------------------------------------
444 
453 {
454 public:
455  Vole_JuvenileMale(struct_Vole_Adult * p_aVoleStruct);
456  virtual ~Vole_JuvenileMale();
457  virtual void ReInit(struct_Vole_Adult * p_aVoleStruct);
458  virtual bool OnFarmEvent(FarmToDo event);
459  virtual void BeginStep();
460  virtual void Step();
461  virtual void EndStep();
462  virtual void OnKilled();
463 protected:
464  virtual void SetLocation();
465  virtual void FreeLocation();
466  virtual bool GetLocation(int px, int py);
467  TTypeOfVoleState Dispersal(double p_OldQual, int p_Distance);
469  inline bool CanFeed();
470  void st_JuvenileExplore(void);
471  void st_BecomeSubAdult(void);
473 #ifdef __VOLEPESTICIDEON
474  virtual void ModelinkPesticide();
475  virtual void ModelinkPesticide21TWA(double a_dose);
476  virtual void Vinclozolin(double a_dose);
477  virtual void GeneralOrganophosphate(double a_dose);
478  virtual void GeneralEndocrineDisruptor(double /* a_dose */);
479  virtual void GeneticDemoPesticide(double /* a_dose */);
480 
481 #endif
482 };
483 //------------------------------------------------------------------------------
484 
493 {
494 public:
495  Vole_Male(struct_Vole_Adult * p_aVoleStruct);
496  virtual void ReInit(struct_Vole_Adult * p_aVoleStruct);
497  virtual ~Vole_Male();
498  //virtual bool OnFarmEvent(FarmToDo event);
499  //virtual void BeginStep();
500  virtual void Step();
501  virtual void EndStep();
502 protected:
503  VoleDispersalReturns Dispersal(double p_OldQual, int p_Distance);
504  void DetermineTerritorySize();
505  inline bool CanFeed();
506  int st_Maturation(void);
507  void st_Infanticide(void);
508  virtual bool MortalityTest();
510 #ifdef __VOLEPESTICIDEON
511  virtual void ModelinkPesticide();
512  virtual void ModelinkPesticide21TWA(double a_dose);
513  virtual void Vinclozolin(double a_dose);
514  virtual void GeneralOrganophosphate(double a_dose);
515  virtual void GeneralEndocrineDisruptor(double /* a_dose */);
516  virtual void GeneticDemoPesticide(double /* a_dose */);
517 #endif
518 };
519 //------------------------------------------------------------------------------
520 
529 {
530 public:
531  Vole_JuvenileFemale(struct_Vole_Adult * p_aVoleStruct);
532  virtual void ReInit(struct_Vole_Adult * p_aVoleStruct);
533  virtual ~Vole_JuvenileFemale();
534  virtual bool OnFarmEvent(FarmToDo event);
535  virtual void BeginStep();
536  virtual void Step();
537  virtual void EndStep();
538  virtual void OnKilled();
539 protected:
540  // Methods
541  int Dispersal(double p_OldQual, int p_Distance);
542  int st_Evaluate_n_Explore();
543  void st_BecomeSubAdult(void);
544  //unsigned HowManyOldFemales(int p_x, int p_y);
545  virtual void SetLocation();
546  virtual void FreeLocation();
547  virtual bool GetLocation(int px, int py);
548 #ifdef __VOLEPESTICIDEON
549  double m_maturitydelay;
550  virtual void ModelinkPesticide();
551  virtual void ModelinkPesticide21TWA(double a_dose);
552  virtual void Vinclozolin(double a_dose);
553  virtual void GeneralOrganophosphate(double a_dose);
554  virtual void GeneralEndocrineDisruptor(double /* a_dose */);
555  virtual void GeneticDemoPesticide(double /* a_dose */);
556 public:
557  void SetMaturityDelay(double a_delay) { m_maturitydelay = a_delay; }
558 #endif
559 };
560 //---------------------------------------------------------------------------
561 
562 
571 {
572 public:
573  Vole_Female(struct_Vole_Adult * p_aVoleStruct);
574  void ReInit(struct_Vole_Adult * p_aVoleStruct);
575  virtual ~Vole_Female();
576  virtual void Step();
577  int SupplyNoOfYoung() {return m_NoOfYoung;};
578 
579  int SupplyMateId() {return m_MatesIdNo;};
580  int SupplyMateSB() {return m_MateLive;};
581 
582  unsigned SupplyYoungAge() {return m_YoungAge;};
583  bool SupplyPregnant() {return m_Pregnant;};
584 
585  void Set_MateState(int MateState) {m_MateLive = MateState;};
586  void OnInfanticideAttempt();
587 protected:
588 //Attributes
589 
611  unsigned m_YoungAge;
617 
618  // Methods
624  int st_Evaluate_n_Explore();
625  int st_Special_Explore();
627 #ifdef __VOLEPESTICIDEON
628  unsigned int m_pesticideloadindex;
629  double m_pesticideloadarray[21];
630  virtual void ModelinkPesticide();
631  virtual void ModelinkPesticide21TWA(double a_dose);
632  virtual void Vinclozolin(double a_dose);
633  virtual void GeneralOrganophosphate(double a_dose);
634  virtual void GeneralEndocrineDisruptor(double /* a_dose */);
635  static int m_EndoCrineDisruptionGestationLength;
636  virtual void GeneticDemoPesticide(double /* a_dose */);
637 #endif
638 };
639 //---------------------------------------------------------------------------
640 #endif
unsigned int uint32
Definition: ALMaSS_Setup.h:34
GeneticMaterial.h This file contains the headers for the genetic material classes
Definition: GeneticMaterial.h:126
Class to handle statistics and constructs based on allele frequencies.
Definition: GeneticMaterial.h:62
A class defining an animals position.
Definition: PopulationManager.h:170
Definition: GeneticMaterial.h:154
Definition: GeneticMaterial.h:193
Class for the genetic material optionally carried by animals in ALMaSS.
Definition: GeneticMaterial.h:95
int HeterozygosityCount()
Definition: GeneticMaterial.cpp:328
uint32 GetAllele(int pos, int Chromosome)
Definition: GeneticMaterial.cpp:233
void SetDirectFlag()
Definition: GeneticMaterial.cpp:173
void UnsetGeneticFlag()
Definition: GeneticMaterial.cpp:178
int HomozygosityCount()
Definition: GeneticMaterial.cpp:317
void UnsetDirectFlag()
Definition: GeneticMaterial.cpp:182
uint32 GetDirectFlag()
Definition: GeneticMaterial.cpp:191
uint32 GetGeneticFlag()
Definition: GeneticMaterial.cpp:187
void SetGeneticFlag()
Definition: GeneticMaterial.cpp:169
A class for storing the position of the trap the vole is in.
Definition: vole_all.h:113
bool m_inAtrap
Definition: vole_all.h:115
The landscape class containing all environmental and topographical data.
Definition: landscape.h:113
int BackTranslateVegTypes(TTypesOfVegetation VegReference)
Definition: landscape.h:1669
int BackTranslateEleTypes(TTypesOfLandscapeElement EleReference)
Definition: landscape.h:1662
int SupplyPolyRef(int a_x, int a_y)
Definition: landscape.h:1488
TTypesOfVegetation SupplyVegType(int a_x, int a_y)
Definition: landscape.h:1321
TTypesOfLandscapeElement SupplyElementType(int a_polyref)
Definition: landscape.h:1110
Movement maps are used for rapid computing of animal movement.
Definition: MovementMap.h:75
The base class for all ALMaSS animal classes.
Definition: PopulationManager.h:205
int m_Location_y
Definition: PopulationManager.h:228
int m_Location_x
Definition: PopulationManager.h:225
virtual void CopyMyself()
Definition: PopulationManager.h:224
Landscape * m_OurLandscape
Definition: PopulationManager.h:229
Base class for voles - all vole objects are descended from this class.
Definition: vole_all.h:153
void Set_BirthYear(int BirthYear)
Definition: vole_all.h:302
virtual void Step()
Step behaviour - must be implemented in descendent classes.
Definition: vole_all.h:291
Vole_Base(struct_Vole_Adult *p_aVoleStruct)
Constructor for Vole_Base.
Definition: Vole_all.cpp:228
unsigned m_MotherId
Definition: vole_all.h:166
void CheckTraps()
Definition: Vole_all.cpp:2800
virtual int WhatState()
Definition: vole_all.h:332
int SupplyIDNo()
Definition: vole_all.h:364
virtual void BeginStep()
BeingStep behaviour - must be implemented in descendent classes.
Definition: vole_all.h:290
static double m_FHabQualThreshold3
Definition: vole_all.h:235
unsigned SupplyX()
Definition: vole_all.h:372
void Setm_Mature()
Definition: vole_all.h:300
static bool m_BreedingSeason
Definition: vole_all.h:247
int SupplyAllele(int locus, int allele)
Definition: vole_all.h:386
static double m_MHabQualThreshold3
Definition: vole_all.h:241
int SupplyXBorn()
Definition: vole_all.h:348
GeneticMaterial SupplyGenes()
Definition: vole_all.h:402
int m_VegBorn
Definition: vole_all.h:188
static double m_MHabQualThreshold1
Definition: vole_all.h:245
static double m_FHabQualThreshold1
Definition: vole_all.h:239
InTrapPosition SupplyTrapPosition()
Definition: vole_all.h:378
int SupplyElemBorn()
Definition: vole_all.h:354
int GetDirectFlag()
Definition: vole_all.h:392
void st_Dying()
All voles end here on death.
Definition: Vole_all.cpp:348
void SetGeneticFlag()
Definition: vole_all.h:394
int SimH
Definition: vole_all.h:210
int SimW
Definition: vole_all.h:210
void UnsetGeneticFlag()
Definition: vole_all.h:398
bool m_Sex
Definition: vole_all.h:174
double CalculateCarryingCapacity(int x, int y, int a_ddep)
Definition: Vole_all.cpp:384
int m_NoOfYoungTotal
Definition: vole_all.h:200
void UnsetDirectFlag()
Definition: vole_all.h:400
double SupplyWeight()
Definition: vole_all.h:362
bool m_Mature
Definition: vole_all.h:176
virtual void RodenticideIngestion(void)
Definition: Vole_all.cpp:3343
int m_BirthYear
Definition: vole_all.h:157
void DoWalkingCorrect(int p_Distance, int &p_Vector, int &vx, int &vy)
Walking where there is a danger of stepping off the world.
Definition: Vole_all.cpp:1041
void DoWalking(int p_Distance, int &p_Vector, int &vx, int &vy)
Walking.
Definition: Vole_all.cpp:953
unsigned SupplyAge()
Definition: vole_all.h:370
int MoveQuality(int p_x, int p_y)
Test a location for quality while moving.
Definition: Vole_all.cpp:1207
int SupplyBirthYear()
Definition: vole_all.h:344
double m_Weight
Definition: vole_all.h:192
void Set_YBorn(int a_Location_y)
Definition: vole_all.h:313
int SupplyHomoZyg()
Definition: vole_all.h:382
int m_DispVector
Definition: vole_all.h:202
GeneticMaterial m_MyGenes
Definition: vole_all.h:213
void Set_NoYoungTot(int a_NoOfYoung)
Definition: vole_all.h:309
int SupplyMotherId()
Definition: vole_all.h:340
virtual void Init(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:240
virtual void EndStep()
All voles age at the end of the day.
Definition: Vole_all.cpp:336
int SupplyFatherId()
Definition: vole_all.h:338
void Escape(int p_Vector, int p_Distance)
Dispersal - directed movement.
Definition: Vole_all.cpp:1127
int SupplyTerrRange()
Definition: vole_all.h:360
unsigned int m_MinTerrRange
Definition: vole_all.h:164
static double m_MinMVoleHabQual
Definition: vole_all.h:228
virtual bool MortalityTest()
Do a mortality test.
Definition: Vole_all.cpp:362
bool SupplyInTrap()
Definition: vole_all.h:376
int m_Age
Definition: vole_all.h:178
unsigned SupplyY()
Definition: vole_all.h:374
int SupplyHeteroZyg()
Definition: vole_all.h:384
int SupplyVegBorn()
Definition: vole_all.h:358
static unsigned int m_MaxFemaleTerritorySize
Definition: vole_all.h:218
virtual void SetLocation()
Definition: vole_all.h:439
static double m_FemaleTerritoryRangeSlope
Definition: vole_all.h:232
int m_PolyRefBorn
Definition: vole_all.h:184
int m_ElemBorn
Definition: vole_all.h:186
void MoveTo(int p_Vector, int p_Distance, int iterations)
Movement.
Definition: Vole_all.cpp:907
bool GetFertile()
Get the male vole fertility.
Definition: vole_all.h:424
int SupplyYBorn()
Definition: vole_all.h:350
void Set_PolyRefBorn(int a_Location_x, int a_Location_y)
Definition: vole_all.h:327
static unsigned int m_MinFemaleTerritorySize
Definition: vole_all.h:222
int SupplyPolyRefBorn()
Definition: vole_all.h:352
int m_TerrRange
Definition: vole_all.h:172
virtual bool GetLocation(int, int)
Definition: vole_all.h:441
bool SupplyBornLastYear()
Were we born this year?
Definition: vole_all.h:334
int m_Death
Definition: vole_all.h:170
Vole_Population_Manager * m_OurPopulation
Definition: vole_all.h:408
unsigned m_FatherId
Definition: vole_all.h:168
bool SupplyTerritorial()
Definition: vole_all.h:336
bool m_BornLastYear
A flag set if the female was born the year before.
Definition: vole_all.h:162
bool m_fertile
Flag indicating the fertility state (true means fertile)
Definition: vole_all.h:194
int m_XBorn
Definition: vole_all.h:180
int m_YBorn
Definition: vole_all.h:182
void SetBreedingSeason(bool a_flag)
Set Breeding Season flag.
Definition: vole_all.h:296
virtual ~Vole_Base()
Definition: Vole_all.cpp:304
void Set_MotherId(unsigned MotherIdNo)
Definition: vole_all.h:305
static unsigned int m_MaxMaleTerritorySize
Definition: vole_all.h:216
static double m_MHabQualThreshold2
Definition: vole_all.h:243
int m_Reserves
Definition: vole_all.h:206
static unsigned int m_MinMaleTerritorySize
Definition: vole_all.h:220
bool SupplyMature()
Definition: vole_all.h:366
int SupplyDeathCause()
Definition: vole_all.h:368
static double m_MaleTerritoryRangeSlope
Definition: vole_all.h:230
void SetWeight(double W)
Definition: vole_all.h:298
int GetGeneticFlag()
Definition: vole_all.h:390
bool m_Have_Territory
Definition: vole_all.h:204
virtual void ReInit(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:235
virtual void FreeLocation()
Definition: vole_all.h:440
static double m_FHabQualThreshold2
Definition: vole_all.h:237
int m_LifeSpan
Definition: vole_all.h:190
bool SupplySex()
Definition: vole_all.h:342
unsigned IDNo
Definition: vole_all.h:208
static double m_MinFVoleHabQual
Definition: vole_all.h:224
void SetFertile(bool f)
Set the male vole fertility.
Definition: vole_all.h:414
void SetFree()
Definition: vole_all.h:380
void Set_Age(int Age)
Definition: vole_all.h:329
TTypesOfLandscapeElement SupplyElemType()
Definition: vole_all.h:356
int SupplyTotNoYoung()
Definition: vole_all.h:346
InTrapPosition m_intrappos
Definition: vole_all.h:214
void Set_VegBorn(int a_Location_x, int a_Location_y)
Definition: vole_all.h:321
uint32 SupplyMyAllele(int i, int j)
Definition: vole_all.h:387
TTypeOfVoleState CurrentVState
Definition: vole_all.h:407
void SetDirectFlag()
Definition: vole_all.h:396
static double m_MinJMVoleHabQual
Definition: vole_all.h:226
void Set_XBorn(int a_Location_x)
Definition: vole_all.h:311
void Set_ElemBorn(int a_Location_x, int a_Location_y)
Definition: vole_all.h:315
virtual void OnKilled()
Definition: vole_all.h:404
void Set_FatherId(unsigned FatherIdNo)
Definition: vole_all.h:307
The class for female voles.
Definition: vole_all.h:571
TTypeOfVoleState st_ReproBehaviour()
Reproductive switch.
Definition: Vole_all.cpp:1974
unsigned m_YoungAge
The age of current litter in days.
Definition: vole_all.h:611
int m_NoOfYoung
The number of young in the current litter (if one).
Definition: vole_all.h:596
GeneticMaterial m_MatesGenes
The DNA passed from the male on mating.
Definition: vole_all.h:616
int SupplyMateSB()
Definition: vole_all.h:580
int st_Special_Explore()
Post weaning territory expansion.
Definition: Vole_all.cpp:2273
Vole_Female(struct_Vole_Adult *p_aVoleStruct)
Vole_Female constructor.
Definition: Vole_all.cpp:1852
int st_Evaluate_n_Explore()
Main territory evaluation behaviour.
Definition: Vole_all.cpp:2228
virtual ~Vole_Female()
Definition: Vole_all.cpp:1891
TTypeOfVoleState st_Mating()
Female mating.
Definition: Vole_all.cpp:2341
int SupplyMateId()
Definition: vole_all.h:579
TTypeOfVoleState st_BecomeReproductive()
Female vole maturation control.
Definition: Vole_all.cpp:2005
void Set_MateState(int MateState)
Definition: vole_all.h:585
int m_DaysUntilBirth
A counter counting down gestation days.
Definition: vole_all.h:606
int SupplyNoOfYoung()
Definition: vole_all.h:577
bool m_Pregnant
A flag indicating whether pregnant or not.
Definition: vole_all.h:601
void ReInit(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:1870
unsigned SupplyYoungAge()
Definition: vole_all.h:582
void OnInfanticideAttempt()
Determines whether an infanticide attempt will succeed.
Definition: Vole_all.cpp:2380
bool SupplyPregnant()
Definition: vole_all.h:583
virtual void Step()
Female vole Step.
Definition: Vole_all.cpp:1906
TTypeOfVoleState st_GiveBirth()
Litter production.
Definition: Vole_all.cpp:2024
TTypeOfVoleState st_UpdateGestation()
Gestation control.
Definition: Vole_all.cpp:1991
TTypeOfVoleState st_Lactating()
Lactation.
Definition: Vole_all.cpp:2090
int m_MatesIdNo
Definition: vole_all.h:591
int m_MateLive
Definition: vole_all.h:590
The class for female voles.
Definition: vole_all.h:529
virtual void EndStep()
Female vole EndStep.
Definition: Vole_all.cpp:1474
virtual void BeginStep()
Female vole BeginStep.
Definition: Vole_all.cpp:1393
Vole_JuvenileFemale(struct_Vole_Adult *p_aVoleStruct)
Vole_JuvenileFemale constructor.
Definition: Vole_all.cpp:1349
virtual bool GetLocation(int px, int py)
Location map function.
Definition: Vole_all.cpp:1799
virtual bool OnFarmEvent(FarmToDo event)
External event handler.
Definition: Vole_all.cpp:1529
virtual void OnKilled()
Death from external entity.
Definition: Vole_all.cpp:1718
virtual void Step()
JuvenileFemale vole Step.
Definition: Vole_all.cpp:1426
virtual void FreeLocation()
Location map function.
Definition: Vole_all.cpp:1792
int Dispersal(double p_OldQual, int p_Distance)
Female dispersal.
Definition: Vole_all.cpp:1817
virtual void SetLocation()
Location map function.
Definition: Vole_all.cpp:1785
void st_BecomeSubAdult(void)
Definition: Vole_all.cpp:1725
virtual void ReInit(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:1363
int st_Evaluate_n_Explore()
Main territory evaluation behaviour.
Definition: Vole_all.cpp:1760
virtual ~Vole_JuvenileFemale()
Definition: Vole_all.cpp:1378
The class for juvenile male voles.
Definition: vole_all.h:453
virtual void EndStep()
Juvenile Male vole EndStep.
Definition: Vole_all.cpp:3181
virtual void FreeLocation()
Map location function.
Definition: Vole_all.cpp:3085
virtual ~Vole_JuvenileMale()
Definition: Vole_all.cpp:3333
virtual void BeginStep()
Juvenile Male vole BeginStep.
Definition: Vole_all.cpp:3108
void st_BecomeSubAdult(void)
Definition: Vole_all.cpp:3264
TTypeOfVoleState st_Eval_n_Explore(void)
JuvenileMale vole main territory assessment behaviour.
Definition: Vole_all.cpp:3209
void DetermineTerritorySize()
virtual bool GetLocation(int px, int py)
Map location function.
Definition: Vole_all.cpp:3094
Vole_JuvenileMale(struct_Vole_Adult *p_aVoleStruct)
Vole_JuvenileMale constructor.
Definition: Vole_all.cpp:3313
void st_JuvenileExplore(void)
Extra movement on weaning.
Definition: Vole_all.cpp:2873
TTypeOfVoleState Dispersal(double p_OldQual, int p_Distance)
JuvenileMale vole dispersal behaviour.
Definition: Vole_all.cpp:3237
virtual void SetLocation()
Map location function.
Definition: Vole_all.cpp:3076
virtual void OnKilled()
JuvenileMale vole death by external entity.
Definition: Vole_all.cpp:3302
virtual bool OnFarmEvent(FarmToDo event)
JuvenileMale vole exernal event handler.
Definition: Vole_all.cpp:2887
virtual void ReInit(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:3323
virtual void Step()
Juvenile Male vole Step.
Definition: Vole_all.cpp:3141
The class for male voles.
Definition: vole_all.h:493
virtual void ReInit(struct_Vole_Adult *p_aVoleStruct)
Definition: Vole_all.cpp:2424
virtual ~Vole_Male()
Definition: Vole_all.cpp:2435
virtual void EndStep()
Male vole EndStep.
Definition: Vole_all.cpp:2490
void DetermineTerritorySize()
Calculates the territory size needed for a vole of his weight.
Definition: Vole_all.cpp:2778
bool CanFeed()
Currently not used.
Definition: Vole_all.cpp:2793
Vole_Male(struct_Vole_Adult *p_aVoleStruct)
Vole_Male constructor.
Definition: Vole_all.cpp:2413
TTypeOfVoleState st_Eval_n_Explore(void)
Male vole main territory assessment behaviour.
Definition: Vole_all.cpp:2584
int st_Maturation(void)
Male vole maturation control.
Definition: Vole_all.cpp:2549
virtual void Step()
Male vole Step.
Definition: Vole_all.cpp:2450
void st_Infanticide(void)
Male vole infanticide behaviour.
Definition: Vole_all.cpp:2568
VoleDispersalReturns Dispersal(double p_OldQual, int p_Distance)
Male vole dispersal behaviour.
Definition: Vole_all.cpp:2689
virtual bool MortalityTest()
Do a mortality test.
Definition: Vole_all.cpp:2763
The class to handle all vole population related matters.
Definition: VolePopulationManager.h:152
A struct for passing data to create a new vole.
Definition: vole_all.h:123
int FatherStateAtBirth
Definition: vole_all.h:137
int FatherId
Definition: vole_all.h:135
int age
Definition: vole_all.h:127
int y
Definition: vole_all.h:126
int MotherId
Definition: vole_all.h:136
GeneticMaterial Genes
Definition: vole_all.h:141
Vole_Population_Manager * VPM
Definition: vole_all.h:139
int xborn
Definition: vole_all.h:129
bool m_flag
Definition: vole_all.h:142
bool m_gflag
Definition: vole_all.h:143
int ElemBorn
Definition: vole_all.h:132
int PolyRefBorn
Definition: vole_all.h:131
int x
Definition: vole_all.h:125
double weight
Definition: vole_all.h:128
int yborn
Definition: vole_all.h:130
int VegBorn
Definition: vole_all.h:133
int BirthYear
Definition: vole_all.h:134
bool m_dflag
Definition: vole_all.h:144
Landscape * L
Definition: vole_all.h:138
double misc_use
Definition: vole_all.h:145
TTypesOfLandscapeElement
Definition: tole_declaration.h:36
TTypesOfVegetation
Definition: tov_declaration.h:30
FarmToDo
Definition: treatment.h:31
VoleObject
Definition: vole_all.h:99
@ vob_JuvenileMale
Definition: vole_all.h:100
@ vob_Male
Definition: vole_all.h:102
@ vob_foobar
Definition: vole_all.h:104
@ vob_Female
Definition: vole_all.h:103
@ vob_JuvenileFemale
Definition: vole_all.h:101
VoleDispersalReturns
Definition: vole_all.h:78
@ vdisp_Die
Definition: vole_all.h:80
@ vdisp_CarryOn
Definition: vole_all.h:79
@ vdisp_Mature
Definition: vole_all.h:81
@ vdisp_Infanticide
Definition: vole_all.h:82
TTypeOfVoleState
Vole behavioural states.
Definition: vole_all.h:56
@ tovs_ReproBehaviour
Definition: vole_all.h:66
@ tovs_JuvenileExploration
Definition: vole_all.h:59
@ tovs_MDying
Definition: vole_all.h:63
@ tovs_Lactating
Definition: vole_all.h:67
@ tovs_Infanticide
Definition: vole_all.h:62
@ tovs_FDying
Definition: vole_all.h:73
@ tovs_SpecialExplore
Definition: vole_all.h:72
@ tovs_FMaturation
Definition: vole_all.h:69
@ tovs_Mating
Definition: vole_all.h:70
@ tovs_UpdateGestation
Definition: vole_all.h:71
@ tovs_GiveBirth
Definition: vole_all.h:68
@ tovs_MMaturation
Definition: vole_all.h:60
@ tovs_FEvaluateExplore
Definition: vole_all.h:65
@ tovs_InitialState
Definition: vole_all.h:57
@ tovs_MEvaluateExplore
Definition: vole_all.h:61